package com.project8.main;

import android.text.Editable;

import com.project8.book.Page;

public class StickyNote
{
	Editable noteText;
	
	Page page;
	float xCoord;
	float yCoord;
		
    /** This method controls the behavior of pressing the StickyNote button */
    public void setText(Editable editable)
    {
    	noteText = editable;
    	System.out.println(noteText.toString());
    }
    
    public Editable getText()
    {
    	return noteText;
    }
    
    public void setCoordinates(float x, float y)
    {
    	xCoord = x;
    	yCoord = y;
    }
    
    public void setPage(Page p)
    {
    	page = p;
    }
    
    public float getXCoordinate()
    {
    	return xCoord;
    }
    
    public float getYCoordinate()
    {
    	return yCoord;
    }
    
	@Override
	public boolean equals(Object o)
	{
		StickyNote anotherSticky = (StickyNote)o;
		
		if(this.getXCoordinate() == anotherSticky.getXCoordinate() && this.getYCoordinate() == anotherSticky.getYCoordinate())
			return true;
		
		return false;
	}
}
